package com.xiao.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Message {
    private Integer id;
    private long messageid;
    private String title;
    private String content;
    private String appendixsrc;//附件
    private Date endtime;
    private int messagetypeid;
    private Long uid;
    private Long classid;
    private Date addtime;
    private Long consultid;
    private Integer subjectid;

    private Messagetype messagetype;
    private Classinfo classinfo;
    private User user;
    private Subject subject;

    public Message(long messageid, String title, String content, String appendixsrc, Date endtime, Long uid, Long classid, Long consultid, Integer subjectid) {
        this.messageid = messageid;
        this.title = title;
        this.content = content;
        this.appendixsrc = appendixsrc;
        this.endtime = endtime;
        this.uid = uid;
        this.classid = classid;
        this.consultid = consultid;
        this.subjectid = subjectid;
    }

    public Message(String title, String content, String appendixsrc, Date endtime, Long uid, Integer subjectid) {
        this.title = title;
        this.content = content;
        this.appendixsrc = appendixsrc;
        this.endtime = endtime;
        this.uid = uid;
        this.subjectid = subjectid;
    }
}
